<template>
  <div class="welcome_wrapper">
    <div class="welcome_text">
      <h3 class="title_a">欢迎体验</h3>
      <h1 class="title">PBA通用后台管理系统</h1>
      <p class="introduction">-Vue3+ElementPlus+Node+Koa+MongooDb打造</p>
    </div>
    <div class="welcome_img">
      <img
        src="https://iconfont.alicdn.com/t/a86abd5b-7a80-4549-95ee-d074cceec754.png"
        alt="后台欢迎插图"
      />
    </div>
  </div>
</template>

<script>
import { useRouter } from 'vue-router'
export default {
  name: 'Welcome',
  methods: {
    linLogin () {
      this.$router.push('/login')
    }
  },
  mounted () {
    if (!this.$store.state.userInfo.token) {
      this.$router.push('/login')
    }
  }
}
</script>

<style lang="scss" scoped>
.welcome_wrapper {
  width: 100%;
  height: 100%;
  display: flex;
  justify-content: center;
  align-items: center;
  background: #fff;
}
.welcome_text {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
}
.welcome_img {
  flex: 1;
  display: flex;
  justify-content: start;
  align-items: center;
  img {
    width: 5rem;
    height: 5rem;
  }
}
.title_a {
  color: #000;
  font-size: 0.3rem;
}
.title {
  font-size: 0.48rem;
  font-weight: bold;
  color: #1e86ff;
  margin: 0.4rem 0 0.1rem 0;
}
.introduction {
  color: #a8a8a8;
}
</style>